# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dataproc.V1.Model.KubernetesClusterConfig do
  @moduledoc """
  The configuration for running the Dataproc cluster on Kubernetes.

  ## Attributes

  *   `gkeClusterConfig` (*type:* `GoogleApi.Dataproc.V1.Model.GkeClusterConfig.t`, *default:* `nil`) - Required. The configuration for running the Dataproc cluster on GKE.
  *   `kubernetesNamespace` (*type:* `String.t`, *default:* `nil`) - Optional. A namespace within the Kubernetes cluster to deploy into. If this namespace does not exist, it is created. If it exists, Dataproc verifies that another Dataproc VirtualCluster is not installed into it. If not specified, the name of the Dataproc Cluster is used.
  *   `kubernetesSoftwareConfig` (*type:* `GoogleApi.Dataproc.V1.Model.KubernetesSoftwareConfig.t`, *default:* `nil`) - Optional. The software configuration for this Dataproc cluster running on Kubernetes.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :gkeClusterConfig => GoogleApi.Dataproc.V1.Model.GkeClusterConfig.t() | nil,
          :kubernetesNamespace => String.t() | nil,
          :kubernetesSoftwareConfig =>
            GoogleApi.Dataproc.V1.Model.KubernetesSoftwareConfig.t() | nil
        }

  field(:gkeClusterConfig, as: GoogleApi.Dataproc.V1.Model.GkeClusterConfig)
  field(:kubernetesNamespace)
  field(:kubernetesSoftwareConfig, as: GoogleApi.Dataproc.V1.Model.KubernetesSoftwareConfig)
end

defimpl Poison.Decoder, for: GoogleApi.Dataproc.V1.Model.KubernetesClusterConfig do
  def decode(value, options) do
    GoogleApi.Dataproc.V1.Model.KubernetesClusterConfig.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataproc.V1.Model.KubernetesClusterConfig do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
